package ks.server;

import ks.managers.icon.IconManager;
import ks.server.persist.PersistentIconManager;


/**
 * Enables any server-side entity to get access to the key managers that you will
 * be designing.
 * <p>
 * I've inserted the {@link IconManager}. You will need to add the ones that you envision. 
 * 
 * @author George Heineman
 */
public class ServerContext {

	/** These are (essentially) singleton instances. */
	static IconManager iconManager;
	
	/** 
	 * Return IconManager 
	 * 
	 * @return
	 */
	public static IconManager getIconManager() {
		if (iconManager == null) {
			// for persistent lecture today: PersistentIconManager instead
			iconManager = new PersistentIconManager();
			//iconManager = new IconManager();
		}
		
		return iconManager;
	}
}
